package cmdbblacklist

import "time"

type HaproxyErrorLogView struct {
	FiveMinBucket time.Time `json:"five_min_bucket"`
	ClientIp      string    `json:"client_ip"`
	Frontend      string    `json:"frontend"`
	Backend       string    `json:"backend"`
	ErrorCount    uint64    `json:"error_count"`
	Rank          uint64    `json:"rank"`
}

func (h *HaproxyErrorLogView) TableName() string {
	return "haproxy_error_5min_decoded"
}

type HaproxyInfoLogView struct {
	FiveMinBucket time.Time `json:"five_min_bucket"`
	ClientIp      string    `json:"client_ip"`
	Frontend      string    `json:"frontend"`
	Backend       string    `json:"backend"`
	InfoCount     uint64    `json:"info_count"`
	Rank          uint64    `json:"rank"`
}

func (h *HaproxyInfoLogView) TableName() string {
	return "haproxy_info_5min_decoded"
}
